package com.ruoyi.modules.system.enums;

import lombok.Getter;

@Getter
public enum SysJobStatus {

    /**
     * 运行
     */
    RUNNING(0, "运行"),
    /**
     * 停止
     */
    STOPPED(1, "停止"),
    ;

    private final Integer code;
    private final String  desc;

    SysJobStatus(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static boolean validate(Integer code) {
        return RUNNING.getCode().equals(code) || STOPPED.getCode().equals(code);
    }
}
